#ifndef EVENTTAB_H
#define EVENTTAB_H

#include <QWidget>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QScrollArea>
#include <QtCore/QThread>
#include "shard.h"
#include "eventlistener.h"
#include "zonewidget.h"

class EventTab : public QWidget
{
  Q_OBJECT
public:
  explicit EventTab(QWidget *parent = 0);
  ~EventTab();

signals:
  void listening(Shard s);
  void stopping();

public slots:
  void listenToIt(Shard s);
  void stopListening();
  void refresh(const QList<Zone> &list);
  
private:
  QVBoxLayout* mainLayout;
  QLabel* listenerStatus;
  EventListener* listener;
  QThread* listenerThread;
  QScrollArea* eventDisplayer;
};

#endif // EVENTTAB_H
